﻿(function () {
	church.shared =
		{
			settings: {
				urls: {
				},
				vars: {
				},
				elements: {
					wrapper: ".wrapper",
					slider: "#slider"
				}
			},

			list: {
				init: function (settings) {
					$.extend(true, church.shared.settings, settings);
					church.shared.list.initGrid();
				},

				initGrid: function () {
					var wrapper = church.shared.settings.elements.wrapper;
					$(wrapper).hover(function () {
						$(this).children().stop().animate({ marginTop: '80%', opacity: 0 }, 1000);
					}, function () {
						$(this).children().stop().animate({ marginTop: '0%', opacity: 1 }, 1000);
					});
				}
			},
			
			slider: {
				init: function (settings) {
					$.extend(true, church.shared.settings, settings);
					church.shared.slider.initSlider();
				},
				
				initSlider: function () {
					var wrapper = church.shared.settings.elements.slider;
					$(wrapper).nivoSlider();
				}
			}
		};
})();